// pages/stock/stock-info/stock-info.js
var app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    data:'',
    keyword:'',
    imageurl:''
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    let that = this;
    that.setData({
      imageurl: app.globalData.baseImageUrl
    })
    wx.setNavigationBarTitle({
      title: '库存详情',
    })
    app.post('/shop/lackManage').then(res=>{
      that.setData({
        data:res
      })
    })
  },
  inputSearch:function(e){
    let keyword = e.detail.value;
    let that = this;
    app.post('/shop/searchLackManage', { keyword: keyword }).then(res => {
      that.setData({
        data: res,
      })
    });
  }
})